import Vue from 'vue'
import App from './App.vue'

// 导入路由
import router from '@/router/router'

// 导入vuex (npm install vuex@3 --save)
import store from '@/store'
Vue.prototype.$store = store


// 导入配置element-ui (npm install element-ui --save)
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
Vue.use(ElementUI)

// 导入jquery (npm install jquery --save)
import $ from 'jquery'

// 字体图标
import '@/assets/iconfont/iconfont.css';


Vue.config.productionTip = false

new Vue({
  
  render: h => h(App),

  // 创建共用事件总线
  beforeCreate(){
    Vue.prototype.$bus = this;
  },
  created(){
    // 加载本地数据到vuex
    this.$store.dispatch('loadLocalData')
  },
  mounted(){
    
  },
  router,
  store,
  $:$,
}).$mount('#app')
